package com.heima.day2.test12;

public class Rect {
    private double weight;
    private double height;

    public Rect() {
    }

    public Rect(double weight,double height) {
        this.weight = weight;
        this.height = height;
    }
    public Rect(double weight) {
        this.weight = weight;
        this.height = weight;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
    public double area(){
        double area= height * weight;
        return area;
    }
    public double circ(){
        double circ=(height+weight)*2;
        return circ;
    }
}
